'Declaration
Public Class PropertyBridge(Of TPropType) Inherits System.Windows.FrameworkElement
public class PropertyBridge<TPropType> : System.Windows.FrameworkElement
'Declaration
Public Class PropertyBridge(Of TPropType) Inherits System.Windows.FrameworkElement
public class PropertyBridge<TPropType> : System.Windows.FrameworkElement
PropertyBridge<TPropType> exposes two dependency properties, Source and Target, and keeps these property values equal, that is when a value of one property is being changed then the other property is being set to the same value. This simple behavior allows you to use non-DependencyProperty properties along with WPF mechanisms that are designed to work with DependencyProperty-only properties.
The behavioral difference between the Source and Target properties lies in the fact that after an initialization of XAML tree where the PropertyBridge<TPropType> element is included, the Target property value is initialized with the Source property value – in all other respects the behavior of these properties is equivalent.
Note that if you need to use PropertyBridge<TPropType> as a standalone object in run-time, that is without including it in a XAML tree, you need to call its BeginInit and EndInit methods – only after this action PropertyBridge<TPropType> will start property value synchronization.
The useful examples of the PropertyBridge<TPropType> class usage are:
The PropertyBridge<TPropType> class is derived from the System.Windows.FrameworkElement class and, in order to work properly, should be placed somewhere in the visual tree among elements that it should communicate with. The derivation from the System.Windows.FrameworkElement class is intentional; it allows the PropertyBridge<TPropType> to be part of a visual tree, which in turn provides bindings established on its properties with a correct context.
The System.Windows.UIElement.Visibility property of the PropertyBridge<TPropType> element is set to Collapsed by default, so this object will not appear on a screen and doesn't participate in layout measurement and arrangement processes, that is, it doesn't affect a visual representation of the visual tree where it placed in.
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
C1.WPF.Schedule.PropertyBridge<TPropType>
C1.WPF.Schedule.PropertyBridge